#ifndef __FPSCONTROL_H__
#define __FPSCONTROL_H__

#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <GL\freeglut.h>

class FpsCtrl
{
   double time;
   double oldTime;   
   double dTime;
   double frameRate; //frames per second
   int frameCount;
   int width, height;   

   void setWindowTitle (void);
public:
   FpsCtrl (double frameRate, int w);//frames per second
   bool update (const int &w, const int &h);
   void setFrameRate (const double &fr);   
   const double &getFrameRate (void);
   ~FpsCtrl ();
};

#endif